<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>函数隐藏的参数</title>
  </head>
  <body>
    <script>
      function sum() {
        console.log(arguments);
        var result = 0;
        for (var i = 3; i <= 5; i++) {
          console.log(arguments[i]);
          result += arguments[i];
        }
        console.log("[1, 2, 3, 4, 5, 6]后三位的和是:" + result);
      }
      sum(1, 2, 3, 4, 5, 6);
    </script>
  </body>
</html>
